﻿using Microsoft.Phone.Controls;
using System.IO;

namespace WP8.AlmacenamientoDatos
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
        }

        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            MemoryStream ms = new MemoryStream();
            var streamWriter2 = new BinaryWriter(ms);
            streamWriter2.Write(21);
            streamWriter2.Flush();

            ms.Seek(0, SeekOrigin.Begin);

            using (var streamReader = new StreamReader(ms))
            {
                var result = streamReader.ReadToEnd();
            }
        }
    }
}